package org.git.movie.controller;



import com.alibaba.fastjson.JSONObject;
import org.git.movie.service.FfSlideService;
import org.git.movie.util.BaseController;
import org.git.movie.util.BaseResponse;
import org.git.movie.vo.FfSlideVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 轮播表 前端控制器
 * </p>
 *
 * @author 嘻嘻
 * @since 2020-07-16
 */
@RestController
@RequestMapping("video")
public class FfSlideController extends BaseController {

    @Autowired
    FfSlideService ffSlideService;


    /**
     *  获取首页热门视频  五个
     * @return
     */
    @PostMapping("slide.do")
    public BaseResponse<JSONObject> findValidSlideList(){

        List<FfSlideVO> list = ffSlideService.findValidSlideList();

        JSONObject jsonObject = new JSONObject();
        jsonObject.put("list",list);
        return ok(jsonObject);

    }


}

